﻿using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Ongoal.Quotation.Model;
using Ongoal.Quotation.Redis;
using Ongoal.Quotation.Sqlsugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ongoal.Quotation
{
    /// <summary>
    /// 基础接口
    /// </summary>
    public interface ICommonBase
    {
        /// <summary>
        /// 
        /// </summary>
        public IDbFactory? Db { get; }

        public IConfiguration? Config { get; }

        public IRedisProvider? Redis { get; }

        public UserInfo? CurrentUser { get; }
    }
    /// <summary>
    /// 基础接口
    /// </summary>
    public interface IServiceBase
    {
        /// <summary>
        /// 获取对应的服务实体
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        T? GetService<T>();
    }
}
